/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.login.plugin.profile.view;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import com.qihoo.gamecenter.sdk.login.plugin.d;
import com.qihoo.gamecenter.sdk.login.plugin.d.a;
import com.qihoo.gamecenter.sdk.login.plugin.f.a;
import com.qihoo.gamecenter.sdk.login.plugin.h.c;
import com.qihoo.gamecenter.sdk.login.plugin.h.f;

public class UploadProgress extends RelativeLayout {
    private String a;
    private a b;

    public UploadProgress(Context paramContext) {
        super(paramContext);
    }

    public UploadProgress(Activity paramActivity, String paramString, Intent paramIntent) {
        super(paramActivity);
        this.b = a.a(paramActivity);
        this.a = paramString;
        a(paramActivity);
        setOnClickListener(new View.OnClickListener() {
            public void onClick(View paramView) {}
        });
    }

    private void a(Context paramContext) {
        LinearLayout localLinearLayout = new LinearLayout(paramContext);
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-2, -2);
        localLayoutParams.bottomMargin = f.a(paramContext, 13.0F);
        localLayoutParams.addRule(13, -1);
        localLinearLayout.setLayoutParams(localLayoutParams);
        localLinearLayout.setGravity(17);
        ImageView localImageView = new ImageView(paramContext);
        LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(f.a(paramContext, 25.0F), f.a(
                paramContext, 25.0F));
        localLayoutParams1.leftMargin = f.a(paramContext, 20.0F);
        localLayoutParams1.rightMargin = f.a(paramContext, 8.0F);
        localLayoutParams1.topMargin = (localLayoutParams1.bottomMargin = f.a(paramContext, 13.0F));
        localImageView.setLayoutParams(localLayoutParams1);
        localLinearLayout.addView(localImageView);
        TextView localTextView = new TextView(paramContext);
        LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(-2, -2);
        localTextView.setLayoutParams(localLayoutParams2);
        localTextView.setTextColor(-11776948);
        localLayoutParams2.rightMargin = f.a(paramContext, 20.0F);
        localTextView.setTextSize(1, c.j);
        localTextView.setText(d.a(d.a.dd));
        localLinearLayout.addView(localTextView);
        this.b.a(localLinearLayout, -1073741812);
        addView(localLinearLayout);
        a(localImageView);
    }

    private void a(ImageView paramImageView) {
        this.b.a(paramImageView, 1073741871);
        RotateAnimation localRotateAnimation = new RotateAnimation(0.0F, 360.0F, 1, 0.5F, 1, 0.5F);
        localRotateAnimation.setRepeatCount(-1);
        localRotateAnimation.setDuration(1000L);
        localRotateAnimation.setInterpolator(new LinearInterpolator());
        paramImageView.setAnimation(localRotateAnimation);
    }
}